import request from '@/utils/request'

const outline = {
  // 大纲列表
  list(params){
    return request.get(`/kjxm/project/outlineList`,{params});
  },
  myList(params){
    return request.get(`/kjxm/project/myOutlineList`,{params});
  },
  // 大纲添加
  add(data){
    return request.post('/kjxm/projectOutline/add', data);
  },
  // 大纲修改
  update(data){
    return request.post('/kjxm/projectOutline/update', data);
  },
  projectOutlinePreWorkAdd(data){
    return request.post('/kjxm/projectOutlinePreWork/add', data);
  },
  projectOutlinePreWorkUpdate(data){
    return request.post('/kjxm/projectOutlinePreWork/update', data);
  },
  // 3.10.9.根据大纲id获取大纲前期研究及工作基础
  projectOutlinePreWorkGetById(id){
    return request.get(`/kjxm/projectOutlinePreWork/getByOutlineId/${id}`);
  },
  projectOutlineNecessityAdd(data){
    return request.post('/kjxm/projectOutlineNecessity/add', data);
  },
  projectOutlineNecessityUpdate(data){
    return request.post('/kjxm/projectOutlineNecessity/update', data);
  },
  // 3.10.13.根据大纲id获取大纲项目研究的开发背景以及必要性
  projectOutlineNecessityGetById(id){
    return request.get(`/kjxm/projectOutlineNecessity/getByOutlineId/${id}`);
  },
  // 新增项目大纲项目研究、开发实施方案
  projectOutlineImplPlanAdd(data){
    return request.post('/kjxm/projectOutlineImplPlan/add', data);
  },
  projectOutlineImplPlanUpdate(data){
    return request.post('/kjxm/projectOutlineImplPlan/update', data);
  },
  projectOutlineImplPlanGetById(id){
    return request.get(`/kjxm/projectOutlineImplPlan/getByOutlineId/${id}`);
  },
  projectOutlineOtherAdd(data){
    return request.post(`/kjxm/projectOutlineOther/add`, data);
  },
  projectOutlineOtherUpdate(data){
    return request.post(`/kjxm/projectOutlineOther/update`, data);
  },
  projectOutlineOtherGetById(id){
    return request.get(`/kjxm/projectOutlineOther/getByOutlineId/${id}`);
  },
  //
  projectOutlineExplainAdd(data){
    return request.post(`/kjxm/projectOutlineExplain/add`, data);
  },
  projectOutlineExplainUpdate(data){
    return request.post(`/kjxm/projectOutlineExplain/update`, data);
  },
  projectOutlineExplainGetByOutlineId(id){
    return request.get(`/kjxm/projectOutlineExplain/getByOutlineId/${id}`);
  },
  // 大纲获取
  get(id){
    return request.get(`/kjxm/projectOutline/detail/${id}`);
  },
  // 大纲详情获取
  getAll(id) {
    return request.get(`/kjxm/projectOutline/allDetail/${id}`);
  },
  getAllHistory(id){
    return request.get(`/kjxm/projectOutline/allHistoryDetail/${id}`);
  },
  // 大纲项目id获取
  getByProject(id){
    return request.get(`/kjxm/projectOutline/getByProjectId/${id}`);
  },
  // 大纲提交
  submit(data){
    return request.post('/kjxm/projectOutline/submit', data);
  },
  oldSubmit(data){
    return request.post('/kjxm/projectOutline/submitHistory', data);
  },
  addSubmit(data){
    return request.post('/kjxm/projectOutline/addSubmit', data);
  },
  createPDF(id,outType){
    return request.post(`/kjxm/projectOutline/createPdfByWindows/${id}/${outType}`);
  },
  getSubmitTime(id){
    return request.get(`/kjxm/projectOutline/getSubmitTime/${id}`);
  },
  // 大纲经济效益和社会效益评估
  projectOutlineBenefitsAdd(data){
    return request.post(`/kjxm/projectOutlineBenefits/add`, data);
  },
  projectOutlineBenefitsUpdate(data){
    return request.post(`/kjxm/projectOutlineBenefits/update`, data);
  },
  projectOutlineBenefitsGetByOutlineId(id){
    return request.get(`/kjxm/projectOutlineBenefits/getByOutlineId/${id}`);
  },
  // 大纲经济指标
  projectOutlineGoalAdd(data){
    return request.post(`/kjxm/projectOutlineGoal/add`, data);
  },
  projectOutlineGoalUpdate(data){
    return request.post(`/kjxm/projectOutlineGoal/update`, data);
  },
  projectOutlineGoalGetByOutlineId(id){
    return request.get(`/kjxm/projectOutlineGoal/getByOutlineId/${id}`);
  },
  getInfoByProjectIdAndReviewType(projectId, reviewType){
    return request.get(`/kjxm/projectExpertsInfo/getInfoByProjectIdAndReviewType/${projectId}/${reviewType}`);
  },
  addProjectExpertsInfo(data){
    return request.post(`kjxm/projectExpertsInfo/add`, data);
  },
}

export default outline;
